package com.example.demo.Services.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.Services.ResourceService;
import com.example.demo.entity.resource;
import com.example.demo.mapper.resourceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * ClassName:UserServicesImpl
 * Package:com.example.demo.Services.impl
 * Description:
 *
 * @date:2019/12/13 10:48
 * @author:
 */
@Service
@Transactional
public class ResourceServicesImpl extends ServiceImpl<resourceMapper, resource> implements ResourceService {

    @Autowired
    private resourceMapper resourceMapper;


    @Override
    public List<resource> findBykey(String key) {
        List<resource> list =  resourceMapper.findByKey(key);
        return list;
    }

    @Override
    public List<resource> findAll() {
        List<resource> list =  resourceMapper.findAll();
        return list;
    }
}
